package com.yanqu.road.entity.kuang.battle;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_kuang_treasure_data")
public class CrossKuangTreasureData extends DataObject {

    @FieldTypeAnnotation(desc = "周次id", select = true, update = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "分组id", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "阵营ID", select = true, update = true)
    private int campId;

    @FieldTypeAnnotation(desc = "宝库轮次")
    private int round;

    @FieldTypeAnnotation(desc = "大奖位置")
    private int specialPosition;

    @FieldTypeAnnotation(desc = "已开启的宝物信息")
    private Map<Integer, CrossKuangTreasureDetailData> treasureDetailDataMap = new ConcurrentHashMap<>();

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if (this.weekId != weekId) {
            this.weekId = weekId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getCampId() {
        return campId;
    }

    public void setCampId(int campId) {
        if (this.campId != campId) {
            this.campId = campId;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public int getSpecialPosition() {
        return specialPosition;
    }

    public void setSpecialPosition(int specialPosition) {
        if (this.specialPosition != specialPosition) {
            this.specialPosition = specialPosition;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, CrossKuangTreasureDetailData> getTreasureDetailDataMap() {
        return treasureDetailDataMap;
    }

    public void setTreasureDetailDataMap(Map<Integer, CrossKuangTreasureDetailData> treasureDetailDataMap) {
        if (treasureDetailDataMap == null) {
            return;
        }
        this.treasureDetailDataMap = treasureDetailDataMap;
        setOp(DataStatus.Update);
    }
}
